

<script setup lang="ts"  name="big-image">
import { computed,onMounted, ref } from "vue";
import Bus from "@/utils/eventBus";
const dialogVisible = ref(false);
const image_url = ref('');
onMounted(() => {
      Bus.$on("openImage", (data: any) => {
        dialogVisible.value = true
        image_url.value = data.link || ''
      });
    });
</script>
<template>
 <el-dialog :close-on-click-modal="false" 
    custom-class="app-video-dialog"
    v-model="dialogVisible"
    title="查看大图"
    width="850px"
  >
    <div class="app-image">
      <img :src="image_url" />
    </div>
  </el-dialog>
</template>

<style lang="scss">
.app-video-dialog {
  .app-image {
    width: 800px;
    height: 400px;
    img {
      width: 100%;
      height: auto;
    }
  }
}
</style>